﻿using System;
using System . Collections . Generic;
using System . Text;
using Windows . UI . Xaml . Data;
using Windows . UI . Xaml . Media;
using Windows . UI . Xaml . Shapes;

namespace RichMan4LApp . Pages . Controls
{
    class LargeAngelConverter : IValueConverter
    {
        object IValueConverter.Convert ( object value , Type targetType , object parameter , string language )
        {

            double lenth = 100 * Math . PI * Convert . ToDouble ( value ) / 360 / 2;

            DoubleCollection collection = new DoubleCollection ( );

            collection . Add ( lenth );

            collection . Add ( double . MaxValue );

            return collection;
        }

        object IValueConverter.ConvertBack ( object value , Type targetType , object parameter , string language )
        {
            throw new NotImplementedException ( );
        }
    }

    class MiddleAngelConverter : IValueConverter
    {
        object IValueConverter.Convert ( object value , Type targetType , object parameter , string language )
        {

            double lenth = 94 * Math . PI * Convert . ToDouble ( value ) / 360 / 2;

            DoubleCollection collection = new DoubleCollection ( );

            collection . Add ( lenth );

            collection . Add ( double.MaxValue );

            return collection;
        }

        object IValueConverter.ConvertBack ( object value , Type targetType , object parameter , string language )
        {
            throw new NotImplementedException ( );
        }
    }

    class SmallAngelConverter : IValueConverter
    {
        object IValueConverter.Convert ( object value , Type targetType , object parameter , string language )
        {

            double lenth = 88 * Math . PI * Convert . ToDouble ( value ) / 360 / 2;

            DoubleCollection collection = new DoubleCollection ( );

            collection . Add ( lenth );

            collection . Add ( double . MaxValue );

            return collection;
        }

        object IValueConverter.ConvertBack ( object value , Type targetType , object parameter , string language )
        {
            throw new NotImplementedException ( );
        }
    }

}
